package com.christina.dto;

import lombok.Data;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 通知消息DTO
 * 
 * @author Christina
 */
@Data
public class NotificationMessage {
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 通知类型
     */
    private NotificationType type;
    
    /**
     * 通知标题
     */
    private String title;
    
    /**
     * 通知内容
     */
    private String content;
    
    /**
     * 额外数据
     */
    private Map<String, Object> data;
    
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    
    /**
     * 是否立即发送
     */
    private Boolean immediate = false;
    
    /**
     * 预定发送时间
     */
    private LocalDateTime scheduleTime;
    
    public NotificationMessage() {
        this.createTime = LocalDateTime.now();
    }
    
    public NotificationMessage(Long userId, NotificationType type, String title, String content) {
        this();
        this.userId = userId;
        this.type = type;
        this.title = title;
        this.content = content;
    }
    
    /**
     * 通知类型枚举
     */
    public enum NotificationType {
        EMAIL("邮件通知"),
        SMS("短信通知"),
        PUSH("推送通知"),
        SYSTEM("系统通知"),
        REMINDER("提醒通知");
        
        private final String description;
        
        NotificationType(String description) {
            this.description = description;
        }
        
        public String getDescription() {
            return description;
        }
    }
}